﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Price.aspx.cs" Inherits="X.WebSite.Product.Price"
    MasterPageFile="~/Master/Master.Master" %>

<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" ID="cph" runat="server">
    <div class="right-inner">
        <h1>
            <%  decimal lowPrice = 0, hightPrice = 0;

                if (!string.IsNullOrEmpty(Request.QueryString["LowPrice"]))
                    lowPrice = decimal.Parse(Request.QueryString["LowPrice"]);

                if (!string.IsNullOrEmpty(Request.QueryString["HightPrice"]))
                    hightPrice = decimal.Parse(Request.QueryString["HightPrice"]);

                string tmp = string.Format("${0} to ${1} range Cheap Beats By Dre", lowPrice, hightPrice);

                this.Title = tmp;

                Response.Write(tmp);
            %>
        </h1>
        <div class="clear">
        </div>
        <%
            System.Collections.Generic.IList<X.Entity.ProductInfo> list = X.Bll.Product.GetListByPrice(0, 0);

            for (int i = 0; i < list.Count; i++)
            {
                if (i % 4 == 0)
                {
                    Response.Write("<div class=\"Showing-product\">");
                    Response.Write("<ul class=\"showlist\">");
                }

                Response.Write("<li><div align=\"center\">");
                Response.Write(string.Format("<a href=\"/Product/{0}/{1}.aspx\" title=\"{2}\">", X.Common.StringUtils.StringToUrl(list[i].CategoryName,list[i].CategoryId), X.Common.StringUtils.StringToUrl(list[i].ProductName,list[i].ProductId), X.Common.StringUtils.HtmlDecode(list[i].ProductName)));
                Response.Write(string.Format("<img src=\"/Upload/{0}\" alt=\"{1}\"></a></div>", list[i].Photo[0].ImageNameEx, X.Common.StringUtils.StringToUrl(list[i].ProductName,list[i].ProductId), X.Common.StringUtils.HtmlDecode(list[i].ProductName)));
                Response.Write("<div class=\"text-pc\">");
                Response.Write(string.Format("<a href=\"/Product/{0}/{1}.aspx\" title=\"{2}\">{3}</a></div>", X.Common.StringUtils.StringToUrl(list[i].CategoryName,list[i].CategoryId), X.Common.StringUtils.StringToUrl(list[i].ProductName,list[i].ProductId), X.Common.StringUtils.HtmlDecode(list[i].ProductName), list[i].ProductName));
                Response.Write("<span class=\"free_shipping\"></span>");
                Response.Write("<div class=\"clear\"></div>");
                Response.Write(string.Format("<div class=\"model\"><p>Model :{0}</p>", list[i].CategoryName));
                Response.Write("<p><font name=\"price\" class=\"font-save\"></font>&nbsp;&nbsp;");
                Response.Write(string.Format("<font name=\"price\" class=\"font-color\">${0}</font>", list[i].Price));
                Response.Write("</p></div></li>");

                if (i % 4 == 0)
                {
                    Response.Write("</ul>");
                    Response.Write("</div>");
                }
            }
        %>
    </div>
</asp:Content>
